﻿<Window x:Class="Mari.SmartHotel.Controls.SHMessageBoxWindow" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Name="MessageBoxWindow"
        Title="SHFMessageBoxWindow"
        Width="350"
        Height="260"
        MinWidth="230"
        MinHeight="150"
        MaxWidth="500"
        MaxHeight="500"
        AllowsTransparency="True"
        Background="Transparent"
        Loaded="MessageBoxWindow_Loaded"
        MouseLeftButtonDown="MessageBoxWindow_MouseLeftButtonDown"
        MouseLeftButtonUp="MessageBoxWindow_MouseLeftButtonUp"
        ShowInTaskbar="False"
        SizeToContent="WidthAndHeight"
        Topmost="True"
        Unloaded="MessageBoxWindow_Unloaded"
        WindowStartupLocation="CenterScreen"
        WindowStyle="None">
    <Border Margin="16" 
            BorderBrush="Black"
            BorderThickness="2"
            CornerRadius="8">
        <Border.Effect>
            <DropShadowEffect BlurRadius="15" />
        </Border.Effect>
        <Border.Background>
            <LinearGradientBrush StartPoint="1,1" EndPoint="0,0">
                <GradientStop Offset="-1" Color="LightBlue" />
                <GradientStop Offset="1" Color="White" />
            </LinearGradientBrush>
        </Border.Background>
        <DockPanel>
            <StackPanel Grid.Row="3" 
                        Margin="0, 10, 0, 5"
                        HorizontalAlignment="Center"
                        DockPanel.Dock="Bottom"
                        Orientation="Horizontal">
                <Button Name="btnOk" 
                        Width="60"
                        Height="Auto"
                        Click="btnOk_Click"
                        Content="OK" />
                <Button Name="btnYes" 
                        Width="60"
                        Height="Auto"
                        Click="btnYes_Click"
                        Content="Si" />
                <Button Name="btnNo" 
                        Width="60"
                        Height="Auto"
                        Margin="20,0,0,0"
                        Click="btnNo_Click"
                        Content="No" />
                <Button Name="btnCancel" 
                        Width="60"
                        Height="Auto"
                        Margin="20,0,0,0"
                        Click="btnCancel_Click"
                        Content="Annulla" />
            </StackPanel>
            <Border Height="25" 
                    HorizontalAlignment="Stretch"
                    VerticalAlignment="Center"
                    Background="Transparent"
                    BorderBrush="Black"
                    BorderThickness="0,0,0,1"
                    DockPanel.Dock="Top">
                <TextBlock Name="txtCaption" 
                           HorizontalAlignment="Center"
                           VerticalAlignment="Center"
                           FontStyle="Italic"
                           FontWeight="Bold"
                           Foreground="Black"
                           Text="{Binding ElementName=MessageBoxWindow, Path=Caption}" />
            </Border>
            <Border Grid.Row="1" 
                    HorizontalAlignment="Stretch"
                    Background="Transparent"
                    BorderBrush="Black"
                    BorderThickness="0,1,0,0">
                <Grid Margin="3">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
                        <Image Name="imgError" 
                               Width="32"
                               Margin="5"
                               VerticalAlignment="Top"
                               Source="/Mari.SmartHotel.Controls;component/Resources/SHMessageBox/error.png"
                               Visibility="Collapsed" />
                        <Image Name="imgInfo" 
                               Width="32"
                               Margin="5"
                               VerticalAlignment="Top"
                               Source="/Mari.SmartHotel.Controls;component/Resources/SHMessageBox/information.png"
                               Visibility="Collapsed" />
                        <Image Name="imgWarning" 
                               Width="32"
                               Margin="5"
                               VerticalAlignment="Top"
                               Source="/Mari.SmartHotel.Controls;component/Resources/SHMessageBox/warning.png"
                               Visibility="Collapsed" />
                        <Image Name="imgQuestion" 
                               Width="32"
                               Margin="5"
                               VerticalAlignment="Top"
                               Source="/Mari.SmartHotel.Controls;component/Resources/SHMessageBox/question.png"
                               Visibility="Collapsed" />
                        <Image Name="imgAsterisk" 
                               Width="32"
                               Margin="5"
                               VerticalAlignment="Top"
                               Source="/Mari.SmartHotel.Controls;component/Resources/SHMessageBox/asterisk.png"
                               Visibility="Collapsed" />
                        <ScrollViewer MaxWidth="500" 
                                      MaxHeight="400"
                                      Background="Transparent"
                                      VerticalScrollBarVisibility="Auto">
                            <StackPanel Margin="25,0,0,0" Orientation="Vertical">
                                <TextBlock Name="txtMessage" 
                                           VerticalAlignment="Center"
                                           Text="{Binding ElementName=MessageBoxWindow, Path=Message}"
                                           TextWrapping="Wrap" />
                            </StackPanel>
                        </ScrollViewer>
                    </StackPanel>
                    <Expander Name="spExpander" 
                              Grid.Row="2"
                              HorizontalAlignment="Left"
                              ExpandDirection="Down"
                              Visibility="Collapsed">
                        <TextBox Name="txtExceptionMessage" 
                                 MaxHeight="250"
                                 Margin="8"
                                 Background="Transparent"
                                 IsReadOnly="True"
                                 ScrollViewer.CanContentScroll="True"
                                 Text="PROVA"
                                 TextWrapping="Wrap"
                                 VerticalScrollBarVisibility="Auto" />
                    </Expander>
                    <Separator Grid.Row="1" 
                               Height="2"
                               HorizontalAlignment="Stretch"
                               Focusable="False" />
                </Grid>
            </Border>
        </DockPanel>
    </Border>
</Window>
